<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model="info.name">
        <div>{{info.name}}</div>
        <div>{{info.age}}</div>
        {{getNewName}}
        <button v-on:click="changeName">change</button>
        <ul>
            <li>11</li>
            <li>23</li>
        </ul>
        <div v-html="msg"></div>
    </div>
</body>
<script src="./MVVM.js"></script>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            info: {
                name: '111',
                age: 12
            },
            msg: '<h1>it`s good.</h1>',
        },
        computed: {
            getNewName() {
                return `${this.info.name}同学`;
            }
        },
        methods: {
            changeName() {
                this.info.name = "222";
                this.info.age++
            }
        }
    })
</script>
</html>